var app = getApp(), common = require("../../common/common.js");

Page({
  data: {
   
  },
  // 选择科目展示
  checkedModule(res) {
    console.log(res.currentTarget.dataset.ind)
    let _t = this
    _t.setData({
      moduleCheck: res.currentTarget.dataset.ind
    })
  },
  // 选择模拟考试科目
  chooseSubject(t) {
    let _t = this
    let moduleName = t.currentTarget.dataset.name
    wx.navigateTo({
      url: '/xc_train/pages/online/start/start?name=' + moduleName ,
      success: function(res) {},
      fail: function(res) {},
      complete: function(res) {},
    })
  },
  // 科目列表
  subjects(t){
    app.util.request({
      url: 'entry/wxapp/SelectAllType',
      data: {},
      success: function (a) {
        console.log(a)
        t.setData({
          module:a.data.data
        })
      }
    })
  },
  onLoad: function(options) {
    let that = this
    common.config(that), common.theme(that),
    that.subjects(that)
  },
  onReady: function() {

  },
  onShow: function() {

  },
  onHide: function() {

  },
  onUnload: function() {

  },
  onPullDownRefresh: function() {

  },
  onReachBottom: function() {

  },
  onShareAppMessage: function() {

  }
})